package com.example.hy2110szyx.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 航班信息实体
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class FlightInfo {

    private Integer id;

    private String fno;

    private Integer type;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date departureTime;

    private Date landingTime;

    private String rno;

    private String ano;

    private Integer balance;

    private Route route;

    private List<Distribution> distributions;


    public FlightInfo(String fno, Integer type, Date departureTime) {
        this.fno = fno;
        this.type = type;
        this.departureTime = departureTime;
    }


    public FlightInfo(String fno, Integer type) {
        this.fno = fno;
        this.type = type;
    }

    public FlightInfo(String fno, Date departureTime,String rno) {
        this.fno = fno;
        this.departureTime = departureTime;
        this.rno = rno;
    }

}
